/*
 * Copyright (C) 2020-2021 The qidianxue.cn Authors.
 * https://www.qidianxue.cn
 */

package com.qdxwx.models.dto;

import java.io.Serializable;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
public class NodeSmall implements Serializable {

    private static final long serialVersionUID = -287773692177459478L;

    public NodeSmall() {
    }

    public NodeSmall(String id, String name) {
        this.id = id;
        this.name = name;
        this.title = name;
    }

    public NodeSmall(String id, String name, String pId) {
        this.id = id;
        this.name = name;
        this.title = name;
        this.pId = pId;
    }

    private String id;
    private String name;
    private String title;
    private String pId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
        this.title = name;
    }

    public String getTitle() {
        if (title == null)
            return name;
        else
            return title;
    }

    public void setTitle(String title) {
        this.name = title;
        this.title = title;
    }

    public String getpId() {
        return pId;
    }

    public void setpId(String pId) {
        this.pId = pId;
    }

    @Override
    public String toString() {
        return "SmallNode{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", pId='" + pId + '\'' +
                '}';
    }
}
